#ifndef TESTWINDOW_H
#define TESTWINDOW_H

#include <QtGui/QMainWindow>
#include "GeneratedFiles/ui_testwindow.h"
#include "ChimeraManager.h"

class TestWindow : public QMainWindow
{
	Q_OBJECT

public:
	TestWindow(QWidget *parent = 0, Qt::WFlags flags = 0);
	~TestWindow();
	void UpdateToolLocation(int index, float x, float y, float z);

private slots:
	void on_btnReload_clicked();

	void controllerButtonPressed(HDController* sender);
	void controllerButtonMoving(HDController* sender);
	void controllerButtonReleased(HDController* sender);

	void on_cmbPMode1_currentIndexChanged(int index);
	void on_cmbSMode1_currentIndexChanged(int index);
	void on_cmbPMode2_currentIndexChanged(int index);
	void on_cmbSMode2_currentIndexChanged(int index);

	void on_sbRadius1_valueChanged(int value);
	void on_sbRadius2_valueChanged(int value);
	void on_sbNLength1_valueChanged(int value);
	void on_sbNLength2_valueChanged(int value);
	void on_sbGRate1_valueChanged(int value);
	void on_sbGRate2_valueChanged(int value);

	void EditFirstToolProperties(HDController *sender);
	void EditSecondToolProperties(HDController *sender);

	void readFromSharedMemory();

protected:
	void keyPressEvent(QKeyEvent *e);
	void keyReleaseEvent(QKeyEvent *e);

private:

	Ui::TestWindowClass ui;

	QTimer *timer;
	QSharedMemory *sharedMemory;

	Mesh *_mainMesh;
	gfxTool *Tool1, *Tool2;
	ChimeraManager *Manager;

	Vertex3f *NavigationPoint;
	int firstToolProp, secondToolProp;
	QPalette ActivePalette, InactivePalette;
};

#endif // TESTWINDOW_H
